<!DOCTYPE html>
<html lang="en">
	<head>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
	<title>hitTestPoint</title>
	<script type="text/javascript" src="../../lufylegend-1.8.12.min.js"></script>
	</head>
	<body>
			<div id="legend"></div>
<script>
var title;
init(1000/50,"legend",800,450,main);
function main(){
	var layer;
	
	layer = new LSprite();
	layer.graphics.drawRect(0,"#ffffff",[0,0,LGlobal.width,LGlobal.height],true,"#ffffff");
	layer.addEventListener(LMouseEvent.MOUSE_MOVE,onmove);
	layer.name = "无";
	addChild(layer);
	
	title = new LTextField();
	title.size = 18;
	title.x = 10;
	title.y = 5;
	title.text = "移动鼠标进行测试";
	layer.addChild(title);
	
	layer = new LSprite();
	layer.x = 50;
	layer.y = 50;
	layer.graphics.drawRect(2,"#ff0000",[0,0,100,50],true,"#ff0000");
	layer.addEventListener(LMouseEvent.MOUSE_MOVE,onmove);
	addChild(layer);
	tt = new LTextField();
	tt.x = 10;
	tt.y = 5;
	layer.name = tt.text = "对象1";
	layer.addChild(tt);
	
	layer = new LSprite();
	layer.x = 250;
	layer.y = 150;
	layer.graphics.drawArc(2,"#ff0000",[0,0,50,0,2*Math.PI],true,"#888000");
	layer.addEventListener(LMouseEvent.MOUSE_MOVE,onmove);
	addChild(layer);
	tt = new LTextField();
	tt.x = -30;
	tt.y = -5;
	layer.name = tt.text = "对象2";
	layer.addChild(tt);
	
	
	layer = new LSprite();
	layer.x = 50;
	layer.y = 200;
	layer.graphics.drawVertices(2,"#ff0000",[[0,0],[20,150],[50,100],[120,80],[40,60]],true,"#cccccc");
	layer.addEventListener(LMouseEvent.MOUSE_MOVE,onmove);
	addChild(layer);
	tt = new LTextField();
	tt.x = 30;
	tt.y = 70;
	layer.name = tt.text = "对象3";
	layer.addChild(tt);
}
function onmove(e){
	title.text = "移动鼠标进行测试:"+e.clickTarget.name;
}
</script>
	</body>
</html>
